<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:import url="/jsp/pager/pagerForm.jsp"></c:import>

<form method="post" rel="pagerForm" action="<c:url value='/purchaseOrder/showList'/>"
	onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><label>关键词：</label> <input type="text" name="keywords" value="${param.keywords}" /></td>
				</tr>
				<tr>
					<td><label>日期：</label> <input name="abstractMonth" class="date" type="text" value="${param.abstractMonth}"
						readonly=" true" dateFmt="yyyy-M" /></td>
					<td><label>单位全名：</label> <input type="text" name="customer" value="${param.customer}" /></td>
					<td><label>单据类型：</label> <select name="invoiceType" class="combox">
							<option value="">请选择</option>
							<c:forEach var="item" items="${invoiceTypeList}">
								<option value="${item.type}" ${item.type eq param.invoiceType ? 'selected="selected"' : ''}>${item.type}</option>
							</c:forEach>
					</select></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">搜索</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</form>

<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" target="dialog" width="530" height="320" rel="salesOrderAdd" mask="true"
				href="<c:url value='/purchaseOrder/showAdd'/>" title="添加订单"><span>添加</span></a></li>
			<li><a class="edit" target="dialog" width="530" height="320" rel="salesOrderEdit" mask="true"
				href="<c:url value='/purchaseOrder/showEdit/{slt_objId}'/>" title="编辑订单"><span>编辑</span></a></li>
			<li><a class="delete" target="ajaxTodo" href="<c:url value='/purchaseOrder/delete/{slt_objId}'/>" title="你确定要删除吗?"><span>删除</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="javascript:$.printBox('salesOrder_list_print')"><span>打印</span></a></li>
			<li class="line">line</li>
			<li><form method="post" action="<c:url value='/purchaseOrder/upload?navTabId=purchaseOrderList'/>"
					enctype="multipart/form-data" onsubmit="return iframeCallback(this, navTabAjaxDone);">
					<input type="file" name="file" accept="application/vnd.ms-excel" />
					<button type="submit">导入Excel</button>
				</form></li>
		</ul>
	</div>

	<div id="salesOrder_list_print">
		<table class="list" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="141">
			<thead>
				<tr>
					<th width="10%">序号</th>
					<th width="10%" orderField="orderNo" class="${pageHelper.orderField eq 'orderNo' ? param.orderDirection : ''}">单据编号</th>
					<th width="15%" orderField="orderDate" class="${pageHelper.orderField eq 'orderDate' ? param.orderDirection : ''}">日期</th>
					<th width="15%" orderField="company" class="${pageHelper.orderField eq 'company' ? param.orderDirection : ''}">单位全名</th>
					<th width="15%" orderField="orderType" class="${pageHelper.orderField eq 'orderType' ? param.orderDirection : ''}">单据类型</th>
					<th width="15%" orderField="ai" class="${pageHelper.orderField eq 'ai' ? param.orderDirection : ''}">附加说明</th>
					<th width="10%" orderField="money" class="${pageHelper.orderField eq 'money' ? param.orderDirection : ''}">金额</th>
					<th width="10%" orderField="invoice" class="${pageHelper.orderField eq 'invoice' ? param.orderDirection : ''}">是否开发票</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="item" items="${purchaseOrderList}" varStatus="s">
					<tr target="slt_objId" rel="${item.id }">
						<td>${s.index + 1}</td>
						<td>${item.orderNo}</td>
						<td>${item.orderDate}</td>
						<td>${item.company}</td>
						<td>${item.orderType}</td>
						<td>${item.ai}</td>
						<td>${item.money}</td>
						<td>${item.invoice}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>

	<c:import url="/jsp/pager/panelBar.jsp"></c:import>

</div>
